package com.cbgolf.oa.base;

import android.app.Activity;
import android.view.View;

/**
 * Created by lq on 2017/9/13.
 */

public class BaseView {
    protected Activity context;

    protected void init(Activity act) {
        this.context = act;
        findViews();
        setViews();
        setListener();
    }

    protected void findViews() {

    }

    protected void setViews() {

    }

    protected void setListener() {

    }

    protected  <T extends View> T find(int id) {
        return (T) context.findViewById(id);
    }

    public void showProgress() {
    }


    public void stopProgress() {

    }

    public void getDataFail(String msg) {

    }

    public void getDataSuccess(Object obj) {

    }

    public void getDataFail(String msg, int code) {

    }
}
